﻿using Autofac;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VisionAppManager
{
    public static class AppEngine
    {
        private static ContainerBuilder _builder = null;
        public static ContainerBuilder Builder
        {
            get
            {
                if (_builder == null)
                {
                    _builder = new ContainerBuilder();

                    return _builder;
                }
                else
                {
                    return _builder;
                }
            }
        }
        private static IContainer _container = null;
        public static IContainer Container
        {
            get
            {
                if (_container == null)
                {
                    _container = Builder.Build();
                    return _container;
                }
                else
                {
                    return _container;
                }
            }
        }
    }
}
